<Open Tag=[<{]>
<Close Tag=[}>]>
@ModelType <{OwnerU}>_<{TableU}>

@Code
    ViewBag.Title = "Edit"
    Layout = "~/Views/Shared/_Layout.vbhtml"
End Code

<h2>Edit</h2>

@Using (Html.BeginForm())
    @<text>
    @Html.AntiForgeryToken()
    
    <div class="form-horizontal">
        <h4><{Table}></h4>
        <hr />
        @Html.ValidationSummary(true)
    <{If Loop}>
	        <{IsIdentity}>
        @Html.HiddenFor(Function(Model) Model.<{FieldU}>)

	        <{IsNotIdentity}>
	        <{And}>
	        <{IsPKey}>
	        <{And}>
	        <{IsNotFKey}>
        <div class="form-group">
            @Html.LabelFor(Function(Model) Model.<{FieldU}>, New With { .class = "control-label col-md-2" })
            <div class="col-md-10">
                @Html.TextBoxFor(Function(Model) Model.<{FieldU}>, New With { .disabled = "disabled" })
            </div>
        </div>

	        <{IsNotIdentity}>
	        <{And}>
	        <{IsPKey}>
	        <{And}>
	        <{IsFKey}>
        <div class="form-group">
            @Html.LabelFor(Function(Model) Model.<{FieldU}>, New With { .class = "control-label col-md-2" })
            <div class="col-md-10">
                @Html.DropDownList("<{RFieldU}>", null, New With { . disabled = "disabled" })
                @Html.ValidationMessageFor(Function(Model) Model.<{FieldU}>)
            </div>
        </div>

	        <{IsNotIdentity}>
	        <{And}>
	        <{IsNotPKey}>
	        <{And}>
	        <{IsFKey}>
        <div class="form-group">
            @Html.LabelFor(Function(Model) Model.<{FieldU}>, New With { .class = "control-label col-md-2" })
            <div class="col-md-10">
                @Html.DropDownList("<{RFieldU}>")
                @Html.ValidationMessageFor(Function(Model) Model.<{FieldU}>)
            </div>
        </div>

	        <{IsNotIdentity}>
	        <{And}>
	        <{IsNotFKey}>
	        <{And}>
	        <{IsDateTimePicker}>
        <div class="form-group">
            @Html.LabelFor(Function(Model) Model.<{FieldU}>, New With { .class = "control-label col-md-2" })
            <div class="col-md-10">
                @Html.EditorFor(Function(Model) Model.<{FieldU}>, New With { .class = "datepicker" })
                @Html.ValidationMessageFor(Function(Model) Model.<{FieldU}>)
            </div>
        </div>

	        <{IsNotIdentity}>
	        <{And}>
	        <{IsNotPKey}>
	        <{And}>
	        <{IsNotFKey}>
	        <{And}>
	        <{IsNotDateTimePicker}>
        <div class="form-group">
            @Html.LabelFor(Function(Model) Model.<{FieldU}>, New With { .class = "control-label col-md-2" })
            <div class="col-md-10">
                @Html.EditorFor(Function(Model) Model.<{FieldU}>)
                @Html.ValidationMessageFor(Function(Model) Model.<{FieldU}>)
            </div>
        </div>

    <{/If Loop}>
        <div class="form-group">
            <div class="col-md-offset-2 col-md-10">
                <input type="submit" value="Save" class="btn btn-default" />
            </div>
        </div>
    </div>
    </text>
End Using

<div>
    @Html.ActionLink("Back to List", "Index")
</div>

@section Scripts
    @Scripts.Render("~/bundles/jqueryval")
End Section
<Open Tag=[<]>
<Close Tag=[>]>
